package com.ittable.datasource.route.dynamicdatasource.matcher;

import java.util.ArrayList;
import java.util.List;

/**
 * 指定那些 statement 走读数据源
 *
 * @author srh
 * @date 2020/12/20
 **/
public class ReadStatementRuleMatcher {

    private static List<String> filterSingleTables;

    static {
        filterSingleTables = new ArrayList<String>() {{
            add("domain");
        }};
    }

    public static boolean prefixMatch(String statementName) {
        return filterSingleTables.stream().noneMatch(statementName::startsWith);
    }
}
